 
 namedDataCall(namedShow)

 function namedShow(data){
      let rule = data[0]
      console.log(rule)
     
      if(rule.ruleNameStatus==1){
          setChecked("name-allC")
      }else if(rule.ruleNameStatus==0){
          setChecked("name-allC-no")
      }
      if(rule.landType==1){
          setChecked("name-land")
      }else if(rule.landType==0){
          setChecked("name-land-no")
      }
      if(rule.town==1){
          setChecked("name-town")
      }else if(rule.town==0){
          setChecked("name-town-no")
      }
      if(rule.village==1){
          setChecked("name-village")
      }else if(rule.village==0){
          setChecked("name-village-no")
      }
      if(rule.num==1){
          setChecked("name-num")
      }else if(rule.num==0){
          setChecked("name-num-no")
      }
      if(rule.en==1){
          setChecked("name-letter")
      }else if(rule.en==0){
          setChecked("name-letter-no")
      }
      function setChecked(elid){
          $("#"+elid).attr("checked",true).siblings("input").removeAttr("checked")
          $("#"+elid).click()
      }
 }
 
 
 
 
 
 
 
 function namedRule(){
    $(".namedRule").on("click","input:checked",function(e){
  
        $(this).next().css("color","#409EFF").siblings().css("color","#606266")
        if($("#name-allC:checked")){
            $("#name-allC:checked").parent().siblings().css("display","block")
        }
        if($("#name-allC-no:checked")){
            $("#name-allC-no:checked").parent().siblings().css("display","none")
        }

        if($(this).next().text()==="启用"){
            $(this).siblings("i").css("display","inline-block")
        }else{
            $(this).siblings("i").css("display","none")
        }
        fullShow()
    })
    $(".namedRule input:checked").click()
  
   function fullShow() {
        let arr =[];
       if($("#name-land:checked")[0]){
            arr[2]="鱼塘 -"
       }else{
            arr[2]=""
       }
       if($("#name-town:checked")[0]){
            arr[0]="九江镇 -"
       }else{
            arr[0]=""
       }
       if($("#name-village:checked")[0]){
            arr[1]="水南村 -"
       }else{
            arr[1]=""
       }

       if($("#name-letter:checked")[0]){
            arr[3]=" A"
       }else{
            arr[3]=""
       }
       if($("#name-num:checked")[0]){
        arr[3]=" 1"
         }else{
             if(arr[3]===""){
                arr[3]=""
             }
           
         }
         let str = arr.join("")
         $(".full-show-text").text(str)
    }
 }
 namedRule()


 
